package com.fancy.learncenter.ui.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;

import com.fancy.learncenter.R;
import com.fancy.learncenter.bean.QuestionVOsBean;
import com.fancy.learncenter.ui.activity.base.BaseActivity;
import com.fancy.learncenter.ui.fragment.GrammarChooseFillBlankFragment;
import com.fancy.learncenter.ui.fragment.GrammarChooseFillBlankNewFragment;
import com.fancy.learncenter.ui.fragment.GrammarListenAndImageChooseTextFragment;
import com.fancy.learncenter.ui.fragment.GrammarListenAndImageChooseTextNewFragment;
import com.fancy.learncenter.ui.fragment.GrammarListenChooseImageFragment;
import com.fancy.learncenter.ui.fragment.GrammarListenChooseImageNewFragment;
import com.fancy.learncenter.ui.fragment.GrammarListenChooseTextFragment;
import com.fancy.learncenter.ui.fragment.GrammarSeeImageChooseFragment;
import com.fancy.learncenter.ui.fragment.GrammarSeeImageChooseNewFragment;
import com.fancy.learncenter.ui.fragment.SeeWordPuzzleFragment;
import com.fancy.learncenter.ui.fragment.SeeWordPuzzleNewFragment;
import com.fancy.learncenter.ui.fragment.WordFillBlankFragment;
import com.fancy.learncenter.ui.fragment.WordFillBlankNewFragment;
import com.fancy.learncenter.ui.fragment.WordListenChooseImageFragment;
import com.fancy.learncenter.ui.fragment.WordListenChooseImageNewFragment;
import com.fancy.learncenter.ui.fragment.WordSeeImageChooseWordFragment;
import com.fancy.learncenter.ui.fragment.WordSeeImageChooseWordNewFragment;
import com.fancy.learncenter.ui.fragment.WordSeeImageListenSpellFragment;
import com.fancy.learncenter.ui.fragment.WordSeeImageListenSpellNewFragment;
import com.fancy.learncenter.utils.LogUtil;
import com.fancy.learncenter.utils.Utils;

import java.util.ArrayList;

import static com.fancy.learncenter.common.JumpIntentKey.QUESTION_ENTER_TYPE.TEACHER_WORK_PREVIEW;

public class CartoonPreviewWorkActivity extends BaseActivity implements

        GrammarListenChooseImageNewFragment.OnGrammarListenChooseListener,

        WordListenChooseImageNewFragment.OnListenChooseImageListener,

        SeeWordPuzzleNewFragment.OnSeeWordPuzzleListener,

        WordSeeImageChooseWordNewFragment.OnWordSeeImageChooseWordListener,

        WordSeeImageListenSpellNewFragment.OnWordSeeImageListenSpellListener,

        GrammarChooseFillBlankNewFragment.OnGrammarChooseFillBlankListener,

        GrammarListenAndImageChooseTextNewFragment.OnListenChooseListener,

        GrammarSeeImageChooseNewFragment.OnSeeImageChooseListener,

        WordFillBlankNewFragment.OnFillBlankListener {

    int position = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cartoon_preview_work);
        questionBankList = getIntent().getParcelableArrayListExtra("questionVOs");

        position = getIntent().getIntExtra("position", 0);

        LogUtil.MyLog("CartoonPreviewWorkActivity", position + "========CartoonPreviewWorkActivity=====" + questionBankList.size());

        initToolbar(questionBankList.get(position).getConstructionNameCn());

        initView();

    }


    ArrayList<QuestionVOsBean> questionBankList;

    private void initView() {
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        Utils.switchNewFragment(this, transaction, questionBankList, position, R.id.fg_container, TEACHER_WORK_PREVIEW, "", "", "", "");
//        Utils.switchFragment(this, transaction, questionBankList, position, R.id.fg_container, TEACHER_WORK_PREVIEW, "", "", "", "");
    }


    @Override
    public void onSeeWordPuzzle(boolean isDo, int totalNum, String title) {

    }

    @Override
    public void onSeeImageChoose(boolean isDo, int totalNum, String title) {

    }

    @Override
    public void onGrammarListenChoose(boolean isDO, int totalNum, String title) {

    }

    @Override
    public void onWordSeeImageChooseWord(boolean currentIndex, int totalNum, String title) {

    }

    @Override
    public void onListenChooseImage(boolean isDo, int totalNum, String title) {

    }

    @Override
    public void onListenChoose(boolean isDo, int totalNum, String title) {

    }

    @Override
    public void onWordSeeImageListenSpell(boolean isDo, int totalNum, String title) {

    }

    @Override
    public void onFillBlank(boolean isDo, int totalNum, String title) {

    }

    @Override
    public void onGrammarChooseFillBlank(boolean isDo, int totalNum, String title) {

    }
}
